From: Matthieu Gallien Date: Fri, 4 Apr 2025 09:07:28 +0000 (+0200) Subject: do not change permissions of invalid items on discovery X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~48^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=1b2db61ce47f7c800c4a1ca49ca3d9b6113d1324;p=nextcloud-desktop.git do not change permissions of invalid items on discovery if we are going to delete those items, we will make them have the proper permissions when we need Signed-off-by: Matthieu Gallien --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 9d7cede82..9939d4473 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1871,7 +1871,6 @@ bool ProcessDirectoryJob::checkPermissions(const OCC::SyncFileItemPtr &item) item->_errorString = tr("Not allowed because you don't have permission to add subfolders to that folder"); const auto localPath = QString{_discoveryData->_localDir + item->_file}; qCWarning(lcDisco) << "unexpected new folder in a read-only folder will be made read-write" << localPath; - FileSystem::setFolderPermissions(localPath, FileSystem::FolderPermissions::ReadWrite); emit _discoveryData->remnantReadOnlyFolderDiscovered(item); return false; } else if (!item->isDirectory() && !perms.hasPermission(RemotePermissions::CanAddFile)) { @@ -2077,7 +2076,6 @@ int ProcessDirectoryJob::processSubJobs(int nbJobs) _dirItem->_errorString = tr("Not allowed because you don't have permission to add subfolders to that folder"); const auto localPath = QString{_discoveryData->_localDir + _dirItem->_file}; qCWarning(lcDisco) << "unexpected new folder in a read-only folder will be made read-write" << localPath; - FileSystem::setFolderPermissions(localPath, FileSystem::FolderPermissions::ReadWrite); emit _discoveryData->remnantReadOnlyFolderDiscovered(_dirItem); }